import java.util.ArrayList;

public class PrimeFactors {
    public static void main(String[] args) {
        int n = Integer.parseInt("91");
        ArrayList x = generate(n);
        System.out.println(x);
    }

    public static ArrayList generate(int n) {
        ArrayList out = new ArrayList();
        int z = 2;
        while (z * z <= n) {
            if (n % z == 0) {
                out.add(z);
                n = n / z;
            }
            else {
                z++;
            }

        }
        if (n > 1) {
            out.add(n);
        }
        return out;

    }
}